<extend name="Public:base"/>
<block name="sidenav">
<ul class="nav nav-sidebar">
<li><a href="{:U('Users/index')}">平台用户</a></li>
	<li  class="active"><a href="{:U('Users/add')}">添加用户</a></li>
	<li><a href="#">用户统计</a></li>
	<li><a href="{:U('UserGroup/index')}">用户组</a></li>
	<li><a href="#">添加用户组</a></li>
</ul>
<input type="hidden" id="MENU_TARGET" value="_MENU_USERS_" />
</block>
<block name="content">
<div class="container2">
	<gt name="info.id" value="0">
	<form class="form-horizontal" action="{:U('Users/edit')}" method="post" name="form" id="myform">
	<input type="hidden" name="id" value="{$info.id}" />
	<else />
	<form class="form-horizontal" action="{:U('Users/add')}" method="post" name="form" id="myform">
	</gt>
		<div class="form-group">
			<label class="col-xs-2 control-label">用户名称</label>
			<div class="col-md-6">
				<input type="text" name="username" class="form-control" value="{$info.username}" <eq name="info.username" value="admin">readonly="readonly"</eq>>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">密　　码</label>
			<div class="col-md-6">
				<input type="password" name="password" class="form-control" value="" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">确认密码</label>
			<div class="col-md-6">
				<input type="password" name="repassword" class="form-control" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">用户等级</label>
			<div class="col-md-6">
				<select name="gid" class="form-control">
					<volist name="role" id="vo">
						<option value="{$vo.id}" <eq name="vo.id" value="$info.gid">selected=""</eq> >{$vo.name}</option>
					</volist>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">用户状态</label>
			<div class="col-md-6">
				<label class="radio-inline">
				<input type="radio" class="radio" value="1" name="status" id="status1" <if condition="($info.status eq 1) OR ($info['status'] eq '') ">checked=""</if> >启用
				</label>
				<label class="radio-inline">
				<input type="radio" class="radio" value="0" name="status" id="status2" <eq name="info.status" value="0">checked=""</eq> >
					禁用
				</label>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">到期时间</label>
			<div class="col-md-6">
				<input type="text" onClick="WdatePicker()"  name="viptime" id="viptime" class="form-control" value="{$info.viptime|date='Y-m-d',###}" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">备注说明</label>
			<div class="col-md-6">
				<input type="text" name="remark" class="form-control" value="{$info.remark}"/>
			</div>
		</div>
		<div class="form-group">
			<div class="col-md-6 col-xs-offset-2">
				<input type="submit" class="btn btn-success" value="保存" />
			</div>
		</div>
	</form>
</div>
</block>
<block name="css">
<link rel="stylesheet" type="text/css" href="{:STATICS}/datetimepicker/css/datetimepicker.css" />
</block>
<block name="script">
<script src="/Public/User/js/date/WdatePicker.js"></script>
<script type="text/javascript">
</script>
</block>
